/**
 * $Id: global.c 3 2010-10-02 23:39:41Z pmedia@xi-intersection.net $
 */

// -----------------------------------------------------------------------------
// Includes
// -----------------------------------------------------------------------------

// Globals (e.g. system functions and globally shared definitions)
#include "include/global.h"

// Game Modules
#include "include/init-deinit.h"
#include "include/input.h"
#include "include/logic.h"
#include "include/main.h"
#include "include/render.h"

// -----------------------------------------------------------------------------
// Function
// -----------------------------------------------------------------------------

/**
 * This should return an UNIX Timestamp in usec's
 * 
 * @return double
 */

double getTimestamp(void) {
	struct timeval t;
	double tm, tms, tmu;
	
	gettimeofday(&t, 0);
	
	tms = t.tv_sec;
	tmu = t.tv_usec;
	tm  = tmu + (tms * 1000000);
	
	return tm;
}
